<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>点击反转作业</title>
</head>
<body>
    <div id="app">
        <div v-show="isShow1"> Hello,World</div>
        <div v-show="isShow2">dlrwod,olleH</div>
        <button @click="btn">点击反转</button>
    </div>
</body>
</html>

<script src="http://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"> </script>
<script>
   const app = new Vue({
        el: "#app",
        data: {
            isShow1: true,
            isShow2: false,
        },
        methods: {
            btn() {
                this.isShow1 = !this.isShow1
                this.isShow2 = !this.isShow2
            }
        }
    })


</script>